<template>
  <div class="delete" @click="dalete">
      delete
  </div>
</template>

<script>
import {mapActions} from 'vuex'
export default {
    name: 'Deletebtn',
    methods: {
        ...mapActions(['dedelete']),
        dalete(){
            var {classify, title} = this.$route.params
            var obj = {classify, title}
            this.dedelete(obj)
            this.$router.push('/')
        }
    }
}
</script>

<style>
.delete{
    height: 3em;
    width: 5em;
    background-color: #065279;
    border-radius: 0.5em;
    position: fixed;
    bottom: 3em;
    right: 3em;
    color: white;
    text-align: center;
    line-height: 3em;
    cursor: pointer;
}
</style>